package org.ak47.spring.boot.grpc;


import lombok.Data;


/**
 * GrpcChannelProperties
 *
 * @author John Deng
 */
@Data
public class GrpcChannelProperties
{

    public static final String GRPC_DEFAULT_HOST = "127.0.0.1";

    public static final Integer GRPC_DEFAULT_PORT = 7575;

    public static final GrpcChannelProperties DEFAULT = new GrpcChannelProperties();

    private String serverHost = GRPC_DEFAULT_HOST;

    private Integer serverPort = GRPC_DEFAULT_PORT;

    private boolean plaintext = true;

    private boolean enableKeepAlive = true;

    /**
     * The default delay in seconds before we send a keep alive.
     */
    private long keepAliveDelay = 10;

    /**
     * The default timeout in seconds for a keep alive ping request.
     */
    private long keepAliveTimeout = 120;

    /**
     * 通道是否只创建一个，默认true
     */
    private boolean singleton = true;
}